<?xml version="1.0" encoding="UTF-8"?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1">
<jsp:directive.page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" />
<jsp:directive.page import="java.util.ArrayList, java.util.Iterator, cult.ticketing.bean.*" />
<jsp:output omit-xml-declaration="no" doctype-root-element="html" doctype-public="-//W3C//DTD XHTML 1.1//EN" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" />
<jsp:include page="templates/include_header.html" />

<jsp:text><![CDATA[<html>

<link href="]]></jsp:text><jsp:expression>request.getContextPath()</jsp:expression><jsp:text><![CDATA[/css/style.css" rel="stylesheet" type="text/css" />
<link href="]]></jsp:text><jsp:expression>request.getContextPath()</jsp:expression><jsp:text><![CDATA[/css/scrollable-buttons.css" rel="stylesheet" type="text/css" />
<link href="]]></jsp:text><jsp:expression>request.getContextPath()</jsp:expression><jsp:text><![CDATA[/css/scrollable-horizontal.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">
function validateForm()
{
var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
var error = false;
var error_msg = '';

var x=document.forms["signup"]["emailaddress"].value
var y=document.forms["signup"]["cemailaddress"].value
var z=document.forms["signup"]["password"].value
var p=document.forms["signup"]["securitycode"].value

	if (!(filter.test(x)) || x.length<1) {
		error = true;
		error_msg += "Please input email address!\n\n";
	}

        if (!(filter.test(y)) && y.length>=1) {
		error = true;
		error_msg += "Invalid email address!\n\n";
	}

        if(x != y) {
		error = true;
		error_msg += "Email Addresses do not match!\n\n";
	}

        if (z.length<6) {
		error = true;
		error_msg += "Please input at least 6 digits for password!\n\n";
	}

	if(p.length<5) {
		error = true;
		error_msg += "Please input the security code!\n";
	}
	if(error) {
		alert(error_msg);
		return false;
	}


}

</script>

</head>

<body>
<div id="container">

]]></jsp:text>

<jsp:include page="templates/include_menu.jsp" />

<jsp:text><![CDATA[
<div id="main">
        <div id="content">
          <div id="head_image">
        	<div id="slogan"><strong>Cult Ticketing System</strong><br />
       	    </div>
            <div id="under_slogan_text">
                <br /><br /><br /><br />

            </div>
          </div>

         <div id="left">

            ]]></jsp:text>

        <jsp:include page="templates/login.jsp" />

         <jsp:text><![CDATA[
         </div>

         <div id="right">


<form  method="post" onsubmit="return validateForm()" id="signup" name="signup" action=" ]]></jsp:text><jsp:expression>(String)request.getAttribute("javax.servlet.forward.request_uri")</jsp:expression><jsp:text><![CDATA[">
<fieldset>
<legend>New to Here ? </legend>
	<p class="signup"><label for="email">Email Address: </label><input id="emailaddress" name="emailaddress" maxlength="50" size="30" type="text" /><span style="color: red;">*</span><br /></p>
        <p class="signup"><label for="cemail">Confirm Email: </label><input id="cemailaddress" name="cemailaddress" maxlength="50" size="30" type="text" /><span style="color: red;">*</span><br /></p>
        <p class="signup"><label for="pwd">Password: </label><input id="pwd" name="pwd" maxlength="20" size="20" type="text" /><span style="color: red;">*</span><br /></p>
	<p class="signup"><label for="scode">Security Code: </label><input type="text" maxlength="5" size="5" id="securitycode" datatype="Integer" msg="Security code must be entered." name="securitycode" /> <span style="color: red;">*</span>
	<input type="hidden" name="todo" id="todo" value="doSignup" />
        <input type='submit' value='Submit' />
</fieldset>
</form>
        </div>

        </div>
</div>
</div>


]]></jsp:text>
            <jsp:include page="templates/include_footer.html" />
         <jsp:text><![CDATA[


             ]]></jsp:text>
</jsp:root>

  